
#include "CString.c"


int main(void)
{
	CString* string = newCString("hello,world");
	
	puts(string->cString);
	printf("%d\n",string->length);
	printf("%d\n",string->cStringSpaceLength);
	
	for(int i = 0;i < 10;i++)
	{
		string->appendChar(string, 'p');
	}
	puts(string->cString);
	
	string->appendString(string,"---------------------------4668------------hellomwolrdk,ok");
	puts(string->cString);
	
	CString* newString = newCString("oppo,vivio");
	string->appendCString(string, newString);
	puts(string->cString);
	
	printf("\n====>>>:%d\n",countChar(string,'o'));
	
	int index = string->getStringIndex(string,"ello");
	printf("\nindex = %d",index);
	
	string->freeCString(&string);
	newString->freeCString(&newString);
	

	return 0;
}

